package com.naiterui.ehp.bs.b2c.product.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Version;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <pre>
 *
 * </pre>
 *
 * @author fangguanhong
 * @date 2021/4/9 1:25 PM
 * @since 1.0.0
 */
@Data
@Entity
@Table(name = "p_prescription_platform_product")
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class PrescriptionPlatformProduct implements Serializable {
    private static final long serialVersionUID = 8338820012236157486L;

    // 添加商品标志：是
    public static Integer ADD_MEDICINE_YEAH = 1;
    // 添加商品标志：否
    public static Integer ADD_MEDICINE_NO = 0;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id", nullable = false)
    private Long id;
    @Column(name = "platform_id")
    private String platformId;
    @Column(name = "number")
    private String number;
    @Column(name = "name")
    private String name;
    @Column(name = "common_name")
    private String commonName;
    @Column(name = "spec")
    private String spec;
    @Column(name = "approval_number")
    private String approvalNumber;
    @Column(name = "production_enterprise")
    private String productionEnterprise;
    @Column(name = "standard_code")
    private String standardCode;
    @Column(name = "type")
    private Integer type;
    @Column(name = "status")
    private Integer status;
    @Column(name = "unit")
    private String unit;
    @Column(name = "add_medicine_tag")
    private Integer addMedicineTag;
    /**
     * 创建时间
     */
    @Column(name = "created_at", nullable = false)
    private Date createdAt;

    /**
     * 创建人
     */
    @Column(name = "created_by", nullable = false)
    private String createdBy;

    /**
     * 修改人
     */
    @Column(name = "changed_by", nullable = false)
    private String changedBy;

    /**
     * 修改时间
     */
    @Column(name = "changed_at", nullable = false)
    private Date changedAt;

    /**
     * 乐观锁
     */
    @Version
    @Column(name = "version", nullable = false)
    private Integer version;
}
